<template>
  <div class="home-container">
    <h2 class="welcome-title">欢迎使用宿舍管理系统</h2>

    <p class="description">本系统为校园宿舍提供信息化管理支持，涵盖宿舍信息、学生分配、费用管理等核心功能。</p>

    <el-row :gutter="20" class="card-row">
      <el-col :span="6">
        <el-card @click.native="$router.push('/students')" class="card">
          <div class="card-content">
            <i class="el-icon-user"></i>
            <p>学生管理</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card @click.native="$router.push('/dormitories')" class="card">
          <div class="card-content">
            <i class="el-icon-office-building"></i>
            <p>宿舍信息</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card @click.native="$router.push('/fees')" class="card">
          <div class="card-content">
            <i class="el-icon-water-cup"></i>
            <p>水电费管理</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card @click.native="$router.push('/about')" class="card">
          <div class="card-content">
            <i class="el-icon-info"></i>
            <p>关于系统</p>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-divider></el-divider>

    <div class="stats">
      <h3 class="stats-title">系统概览</h3>
      <ul class="stats-list">
        <li>总宿舍数：10间</li>
        <li>已入住学生：35人</li>
        <li>剩余床位：5个</li>
        <li>最近更新时间：2025-04-05</li>
      </ul>
    </div>
  </div>
</template>

<style scoped>
.home-container {
  padding: 20px;
  background-color: #f9f9f9;
}

.welcome-title {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
}

.description {
  color: #666;
  margin-bottom: 30px;
}

.card-row {
  margin-top: 30px;
}

.card {
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.card-content {
  padding: 20px;
}

.card-content i {
  font-size: 40px;
  color: #409EFF;
  margin-bottom: 10px;
}

.stats {
  margin-top: 30px;
}

.stats-title {
  color: #333;
  font-size: 20px;
  margin-bottom: 10px;
}

.stats-list {
  list-style-type: none;
  padding: 0;
}

.stats-list li {
  margin-bottom: 5px;
}
</style>